Imaging with a large depth of focus is desirable in many fields, including photography, film, and various detection applications. However, a region of longitudinal positions at which an object can be sharply imaged is limited, and in general, the larger the imaging module's aperture, the smaller its depth of focus, and the smaller the imaging module's aperture, the larger its depth of focus. For example, lens has a limited depth of focus; but in the extreme case of small aperture it behaves as a pinhole camera, and therefore practically provides a very large depth of focus. However, the pinhole camera's high depth of focus comes at a price of low lateral resolution and low energetic efficiency. In particular, point spread function (PSF) of pinhole is proportional to λD/di, where λ is a light wavelength, D is a pinhole aperture, and di is a distance between the aperture and a light detection surface; such PSF yields the depth of focus proportional to λ(di/D)2, resolution proportional to (λD/di)−1, and energetic efficiency proportional to D2. Thus, a pinhole, while having a very large depth of focus owing to very small aperture D, at the same time has a low resolution (large PSF) and a low energetic efficiency.